\(\int \frac {\sqrt {a+b x}}{x^2 \sqrt {-a-b x}} \, dx\) [818]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [C] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [C] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 25, antiderivative size = 26 \[ \int \frac {\sqrt {a+b x}}{x^2 \sqrt {-a-b x}} \, dx=-\frac {\sqrt {a+b x}}{x \sqrt {-a-b x}} \]

[Out]

-(b*x+a)^(1/2)/x/(-b*x-a)^(1/2)

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.080, Rules used = {23, 30} \[ \int \frac {\sqrt {a+b x}}{x^2 \sqrt {-a-b x}} \, dx=-\frac {\sqrt {a+b x}}{x \sqrt {-a-b x}} \]

[In]

Int[Sqrt[a + b*x]/(x^2*Sqrt[-a - b*x]),x]

[Out]

-(Sqrt[a + b*x]/(x*Sqrt[-a - b*x]))

Rule 23

Int[(u_.)*((a_) + (b_.)*(v_))^(m_)*((c_) + (d_.)*(v_))^(n_), x_Symbol] :> Dist[(a + b*v)^m/(c + d*v)^m, Int[u*
(c + d*v)^(m + n), x], x] /; FreeQ[{a, b, c, d, m, n}, x] && EqQ[b*c - a*d, 0] &&  !(IntegerQ[m] || IntegerQ[n
] || GtQ[b/d, 0])

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rubi steps \begin{align*} \text {integral}& = \frac {\sqrt {a+b x} \int \frac {1}{x^2} \, dx}{\sqrt {-a-b x}} \\ & = -\frac {\sqrt {a+b x}}{x \sqrt {-a-b x}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.00 \[ \int \frac {\sqrt {a+b x}}{x^2 \sqrt {-a-b x}} \, dx=-\frac {\sqrt {a+b x}}{x \sqrt {-a-b x}} \]

[In]

Integrate[Sqrt[a + b*x]/(x^2*Sqrt[-a - b*x]),x]

[Out]

-(Sqrt[a + b*x]/(x*Sqrt[-a - b*x]))

Maple [A] (verified)

Time = 0.60 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.85

method result size
default \(\frac {\sqrt {-b x -a}}{\sqrt {b x +a}\, x}\) \(22\)
gosper \(-\frac {\sqrt {b x +a}}{x \sqrt {-b x -a}}\) \(23\)
risch \(\frac {i \sqrt {\frac {-b x -a}{b x +a}}\, \sqrt {b x +a}}{\sqrt {-b x -a}\, x}\) \(42\)

[In]

int((b*x+a)^(1/2)/x^2/(-b*x-a)^(1/2),x,method=_RETURNVERBOSE)

[Out]

1/(b*x+a)^(1/2)*(-b*x-a)^(1/2)/x

Fricas [A] (verification not implemented)

none

Time = 0.22 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.54 \[ \int \frac {\sqrt {a+b x}}{x^2 \sqrt {-a-b x}} \, dx=\frac {\sqrt {-b^{2}}}{b x} \]

[In]

integrate((b*x+a)^(1/2)/x^2/(-b*x-a)^(1/2),x, algorithm="fricas")

[Out]

sqrt(-b^2)/(b*x)

Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.89 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.77 \[ \int \frac {\sqrt {a+b x}}{x^2 \sqrt {-a-b x}} \, dx=\frac {i b^{2} \left (\frac {a}{b} + x\right )}{- a^{2} + a b \left (\frac {a}{b} + x\right )} \]

[In]

integrate((b*x+a)**(1/2)/x**2/(-b*x-a)**(1/2),x)

[Out]

I*b**2*(a/b + x)/(-a**2 + a*b*(a/b + x))

Maxima [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.08 \[ \int \frac {\sqrt {a+b x}}{x^2 \sqrt {-a-b x}} \, dx=\frac {\sqrt {-b^{2} x^{2} - 2 \, a b x - a^{2}}}{a x} \]

[In]

integrate((b*x+a)^(1/2)/x^2/(-b*x-a)^(1/2),x, algorithm="maxima")

[Out]

sqrt(-b^2*x^2 - 2*a*b*x - a^2)/(a*x)

Giac [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.28 (sec) , antiderivative size = 5, normalized size of antiderivative = 0.19 \[ \int \frac {\sqrt {a+b x}}{x^2 \sqrt {-a-b x}} \, dx=\frac {i}{x} \]

[In]

integrate((b*x+a)^(1/2)/x^2/(-b*x-a)^(1/2),x, algorithm="giac")

[Out]

I/x

Mupad [B] (verification not implemented)

Time = 1.18 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.81 \[ \int \frac {\sqrt {a+b x}}{x^2 \sqrt {-a-b x}} \, dx=\frac {\sqrt {-a-b\,x}}{x\,\sqrt {a+b\,x}} \]

[In]

int((a + b*x)^(1/2)/(x^2*(- a - b*x)^(1/2)),x)

[Out]

(- a - b*x)^(1/2)/(x*(a + b*x)^(1/2))